/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dieci.hibernate;

import dieci.database.PersistentObject;
import dieci.system.Return;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 *
 * @author Blanco
 */
public class HibReturn implements PersistentObject {

    private Date returnDate;
    private long returnId;
    private Set<HibReturnDetails> details = new HashSet<>();
    private int supplierId;
    private long orderId;

    
    
    public HibReturn()
    {
    }

    public HibReturn(Return returns)
    {
        this.supplierId = returns.getSupplier().getSupplierId();
        this.returnDate = returns.getReturnDate();
        this.orderId = returns.getOrder().getOrderId();
    }
    
    public HibReturn(long returnId, Return returns)
    {
        this(returns);
        this.returnId = returnId;
    }
    
    /**
     * Get the value of supplierId
     *
     * @return the value of supplierId
     */
    public int getSupplierId()
    {
        return supplierId;
    }

    /**
     * Set the value of supplierId
     *
     * @param supplierId new value of supplierId
     */
    public void setSupplierId(int supplierId)
    {
        this.supplierId = supplierId;
    }

    public long getOrderId()
    {
        return orderId;
    }

    public void setOrderId(long orderId)
    {
        this.orderId = orderId;
    }

    
    /**
     * Get the value of details
     *
     * @return the value of details
     */
    public Set<HibReturnDetails> getDetails()
    {
        return details;
    }

    /**
     * Set the value of details
     *
     * @param details new value of details
     */
    public void setDetails(Set<HibReturnDetails> details)
    {
        this.details = details;
    }


    /**
     * Get the value of returnId
     *
     * @return the value of returnId
     */
    public long getReturnId()
    {
        return returnId;
    }

    /**
     * Set the value of returnId
     *
     * @param returnId new value of returnId
     */
    public void setReturnId(long returnId)
    {
        this.returnId = returnId;
    }

    /**
     * Get the value of returnDate
     *
     * @return the value of returnDate
     */
    public Date getReturnDate()
    {
        return returnDate;
    }

    /**
     * Set the value of returnDate
     *
     * @param returnDate new value of returnDate
     */
    public void setReturnDate(Date returnDate)
    {
        this.returnDate = returnDate;
    }
}
